import re
test = raw_input()
if re.match('\w+@\w+',test):
    print 'ok'
else:
    print 'failed'
